package com.example.demo.mapper;

import com.example.demo.pojo.Department;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface DepartmentMapper {

    List<Department> selectAll();

    void addDepartment(@Param("department")Department department);

    void deleteDepartmentById(@Param("id")int id);

    Department selectDepartmentById(@Param("id")int id);

    void updateDepartment(@Param("department")Department department);

    void addEmployeeToDepartment(@Param("s_id")int s_id,@Param("d_id")int d_id, @Param("j_id")int j_id);

    void deleteStaffInDepartment(int id);

    void updateStaffDepartmentJob(@Param("s_id") Integer s_id,@Param("d_id")  Integer d_id, @Param("j_id") Integer j_id);
}
